package com.mes.biz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 收支单对象 biz_cost
 * @author wy
 * @email wy
 * @date 2023-08-25
 */
@Data
public class BizCost extends BaseEntity<BizCost>
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    @Excel(name = "编号")
    @LogField
    @FieldRemark(name = "编号",field = "payCode")
    private String payCode;

    /** 费用类型 0-支出 1-收入 */
    @Excel(name = "费用类型 0-支出 1-收入")
    @LogField
    @FieldRemark(name = "费用类型 0-支出 1-收入",field = "costType")
    private String costType;

    /** 客户id */
    @Excel(name = "客户id")
    @LogField
    @FieldRemark(name = "客户id",field = "customerId")
    private String customerId;

    /** 客户名称 */
    @Excel(name = "客户名称")
    @LogField
    @FieldRemark(name = "客户名称",field = "customerName")
    private String customerName;

    /** 付款金额 */
    @Excel(name = "付款金额")
    @LogField
    @FieldRemark(name = "付款金额",field = "payAmount")
    private BigDecimal payAmount;

    /** 预付金额 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    @LogField
    @FieldRemark(name = "订单日期",field = "payDate")
    private String payDate;

    /** 租户id */
    @Excel(name = "租户id")
    @LogField
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    @LogField
    @FieldRemark(name = "审核状态 0-未审核 1-已审核",field = "status")
    private String status;

    private List<BizCostDetail> bizCostDetailList;

    private String condition;

    private String startDate;
    private String endDate;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("payCode", getPayCode())
            .append("costType", getCostType())
            .append("customerId", getCustomerId())
            .append("customerName", getCustomerName())
            .append("payAmount", getPayAmount())
            .append("payDate", getPayDate())
            .append("tenantId", getTenantId())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
